<?php

require_once('Adept/ClassKit/Delegate/Interface.php');

class Adept_ClassKit_Delegate implements Adept_ClassKit_Delegate_Interface 
{
    
    protected $object;
    protected $method;
    
    public function __construct($object, $method) 
    {
        $this->object = $object;
        $this->method = $method;
    }
    
    public function invoke($args) 
    {        
        return call_user_func_array(array($this->object, $this->method), $args);
    }
    
    public function getObject() 
    {
        return $this->object;
    }
    
    public function setObject($object) 
    {
        $this->object = $object;
    }
    
    public function getMethod() 
    {
        return $this->method;
    }
    
    public function setMethod($method) 
    {
        $this->method = $method;
    }
    
}